package com.timeDeal.servlet;








import com.alibaba.druid.util.StringUtils;
import com.timeDeal.bean.UserBean;
import com.timeDeal.bean.XuqiufabuBean;
import com.timeDeal.service.UserService;
import com.timeDeal.service.XuqiuService;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * Created by Administrator on 2016/7/24.
 */

public class XuqiuXiangqingServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, IOException, IOException {
        String id = request.getParameter("id");
        UserBean  liulanren =   (UserBean) request.getSession().getAttribute("USER") ;
        XuqiuService xs = new XuqiuService();
        XuqiufabuBean xfb = xs.getAxuquById(Integer.valueOf(id)) ;
        request.setAttribute("xuqiu", xfb);
        System.out.println(xfb.getZhuangtai()+"TTTTTTTTTTTTTTTTTTTTTTTTTTTTT");
        request.setAttribute("liulanren", liulanren);
        request.getRequestDispatcher("/user/xuqiudetail.jsp").forward(request,response);
    }
}